package com.assignwork.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("throughput_forecast")
@EqualsAndHashCode(callSuper = true)
public class ThroughputForecast extends BaseEntity {

    private String shipName;
    private String voyage;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sourceId;
    private String tradeType;
    private String impExp;
    private Integer isFinish;
    private String shipBerthKey;
    private String cargoType;
    private BigDecimal planTon;
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    private LocalDate planDate;
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    private LocalDateTime begTime;
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    private LocalDateTime endTime;
    private String periodTenDays;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long shipowner;

}
